import '@/styles/common.scss'

import { createApp } from 'vue'
import { createPinia } from 'pinia'

import App from './App.vue'
import router from './router'
//import { getCategoryAPI } from './api/layout'
import { useIntersectionObserver } from '@vueuse/core'
import { lazyPlugin } from './directives'
import { componentPlugin } from './components'
//实现图片监控
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
import { getCategoryAPI } from './api/layout'
const app = createApp(App)
const pinia =  createPinia()
pinia.use(piniaPluginPersistedstate)
app.use(pinia)
app.use(router)
app.use(lazyPlugin)
app.use(componentPlugin)
//封装到diretives中g

getCategoryAPI().then(res=>{
    //console.log(res);
    //console.log(666)
})

//实现图片懒加载

app.mount('#app')
